import server from "@/utils/request";

//分页获取请假列表 mxh
export function getLeaveApplicationByPage(playold: any = {}) {
    return server.get('/school/leaveApplication/getLeaveApplicationByPage', { params: playold })
}
//增加请假
export function saveLeaveApplication(playold: any = {}) {
    return server.post(`/school/leaveApplication/saveLeaveApplication?sId=${playold.sId}&type=${playold.type}&beginTime=${playold.beginTime}&endTime=${playold.endTime}&detail=${playold.detail}&tId=${playold.tId}&state=${playold.state}`, playold)
}
// 根据id获取请假数据 mxh

export function getLeaveApplicationById(id: any) {
    return server.get('/school/leaveApplication/getLeaveApplicationById/' + id)
}

//获取学生列表
export function getStudentByPage(playold: any = {}) {
    return server.get(`/school/student/getStudentByPage`, { params: playold })
}
//撤销请假
export function deleteLeaveApplication(playold: any) {
    return server.delete(`/school/leaveApplication/deleteLeaveApplication/` + playold.id)
}


